package com.littlebee.storychild.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.littlebee.storychild.R;

import butterknife.ButterKnife;
import butterknife.OnClick;

/*fragment页面*/

public class TestFragment extends Fragment {
    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,  
            Bundle savedInstanceState) {
        View convertView = inflater.inflate(R.layout.fragment_test, container, false);
        ButterKnife.bind(this,convertView);//绑定framgent
        return convertView;
    }

    @OnClick(R.id.btn_chat)
    public void onChatBtnClicked() {
        Intent chatIntent = new Intent(getActivity(), ChatActivity.class);
        startActivity(chatIntent);
    }
}
